package org.zhouhe.vo;

import java.sql.Timestamp;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.IDENTITY;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * ServingProcess entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "serving_process", catalog = "zpd0t1_db")
public class ServingProcess implements java.io.Serializable {

	// Fields

	private static final long serialVersionUID = -8591976399176803324L;
	private Integer servingProcessId;
	private User user;
	private String title;
	private String content;
	private Integer orderId;
	private Timestamp displayTime;
	private Timestamp createTime;
	private Timestamp updateTime;
	private Integer status;

	// Constructors

	/** default constructor */
	public ServingProcess() {
	}

	/** minimal constructor */
	public ServingProcess(Integer orderId) {
		this.orderId = orderId;
	}

	/** full constructor */
	public ServingProcess(User user, String title, String content, Integer orderId, Timestamp displayTime, Timestamp createTime,
			Timestamp updateTime, Integer status) {
		this.user = user;
		this.title = title;
		this.content = content;
		this.orderId = orderId;
		this.displayTime = displayTime;
		this.createTime = createTime;
		this.updateTime = updateTime;
		this.status = status;
	}

	// Property accessors
	@Id
	@GeneratedValue(strategy = IDENTITY)
	@Column(name = "serving_process_id", unique = true, nullable = false)
	public Integer getServingProcessId() {
		return this.servingProcessId;
	}

	public void setServingProcessId(Integer servingProcessId) {
		this.servingProcessId = servingProcessId;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "user_id")
	public User getUser() {
		return this.user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	@Column(name = "title", length = 256)
	public String getTitle() {
		return this.title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	@Column(name = "content", length = 65535)
	public String getContent() {
		return this.content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	@Column(name = "order_id")
	public Integer getOrderId() {
		return this.orderId;
	}

	public void setOrderId(Integer orderId) {
		this.orderId = orderId;
	}

	@Column(name = "display_time", length = 19)
	public Timestamp getDisplayTime() {
		return this.displayTime;
	}

	public void setDisplayTime(Timestamp displayTime) {
		this.displayTime = displayTime;
	}

	@Column(name = "create_time", length = 19)
	public Timestamp getCreateTime() {
		return this.createTime;
	}

	public void setCreateTime(Timestamp createTime) {
		this.createTime = createTime;
	}

	@Column(name = "update_time", length = 19)
	public Timestamp getUpdateTime() {
		return this.updateTime;
	}

	public void setUpdateTime(Timestamp updateTime) {
		this.updateTime = updateTime;
	}

	@Column(name = "status")
	public Integer getStatus() {
		return this.status;
	}

	public void setStatus(Integer status) {
		this.status = status;
	}

}